/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ylz
 */
@Entity
@Table(name = "news_snmsg")
//@NamedQueries({@NamedQuery(name = "NewsSnmsg.findAll", query = "SELECT n FROM NewsSnmsg n"), @NamedQuery(name = "NewsSnmsg.findById", query = "SELECT n FROM NewsSnmsg n WHERE n.id = :id"), @NamedQuery(name = "NewsSnmsg.findByMsgtemplateid", query = "SELECT n FROM NewsSnmsg n WHERE n.msgtemplateid = :msgtemplateid")})
public class NewsSnmsg implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "sn")
    private String sn;
    @Column(name = "msg")
    private String msg;
    @Column(name = "hassend")
    private Integer hassend;
    @Column(name = "msgtemplateid")
    private Integer msgtemplateid;
    
    public NewsSnmsg() {
    }

    public NewsSnmsg(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

	public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getHassend() {
        return hassend;
    }

    public void setHassend(Integer hassend) {
        this.hassend = hassend;
    }

    public Integer getMsgtemplateid() {
        return msgtemplateid;
    }

    public void setMsgtemplateid(Integer msgtemplateid) {
        this.msgtemplateid = msgtemplateid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsSnmsg)) {
            return false;
        }
        NewsSnmsg other = (NewsSnmsg) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsSnmsg[id=" + id + "]";
    }

}
